home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / The Director v1.2.adf / library / playanim < prev   
Text File  |  1988-05-08  |  1KB  |  55 lines

  1.  
  2. REM  IFF ANIM player
  3. REM  To use, you must:
  4. REM  1. load the anim first frame
  5. REM  2. make a copy of the image into a second buffer
  6. REM  3. load the anim frame data
  7. REM  4. adjust positioning for overscan if necessary
  8. REM  5. initialize variables:
  9.  
  10. REM         anima   =  buffer number of first frame
  11. REM         animb   =  buffer number of copy of first frame
  12. REM         animdat =  buffer number of anim frame data
  13. REM         animbuf =  animb  (non-displayed screen)
  14. REM         animdone= 0  (last frame flag)
  15.  
  16. REM  6. Do a GOSUB 9100 for each frame or a GOSUB 9101 to do
  17. REM     a frame without pauseing.  animdone will be a 1 at the
  18. REM     last frame.  You will probably want to set SPEED 1
  19.  
  20. REM  uses line nmbers 9100 and 9101, and all variables mentioned
  21. REM  plus animg,animd.
  22.  
  23. REM example setup:
  24.  
  25. REM   REM load and copy
  26. REM   LOAD 1,":anims/tel.anim"
  27. REM   LOADANIM 21,":anims/tel.anim"
  28. REM   POSITION -1,-1
  29. REM   NEW 2,1
  30. REM   COPY -1,2
  31.  
  32. REM   REM now initialize variables
  33. REM   animbuf = 2
  34. REM   animdone=0
  35. REM   anima=1
  36. REM   animb=2
  37. REM   animdat=21
  38. REM   speed 1
  39.  
  40. REM    REM ok, now loop 
  41. REM 10 GOSUB 9100
  42. REM    GOTO 10
  43.  
  44. rem     do next frame in the anim:
  45. 9100 pause 1
  46. 9101 if animdone
  47.       skipanim animdat,animbuf,animg,animd,animdone
  48.    endif
  49.    anim animdat,animbuf,animg,animd,animdone
  50.    display animbuf
  51.    animbuf=(anima+animb)-animbuf
  52.    animp=1
  53.    return
  54.  
  55.